﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace hm4.Controllers
{
    public class LoginController : Controller
    {
        // GET: Login
        public ActionResult Login()
        {
            return View();
        }

        [HttpPost]
        public ActionResult Login(string name,string password)
        {
            if (name == "123" && password == "123")
            {
                return Redirect("~/Home/Index");
            }
            else
            {
                return Content("<script>alert('账号或者密码不正确');window.location.href='../Login/Login';</script>");
            }
        }
    }
}